﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace project_soft.BLStub
{
  public  class Bill1
    {
         private  int Sales_Id;

        public  int Sales_Id1
        {
            get { return Sales_Id; }
            set { Sales_Id = value; }
        }
        private int User_Id;

        public int User_Id1
        {
            get { return User_Id; }
            set { User_Id = value; }
        }
        private DateTime Date;

        public DateTime Date1
        {
            get { return Date; }
            set { Date = value; }
        }
        DBStubLayer.BillDAC1 bill1;
        public Bill1() {
            bill1 = new DBStubLayer.BillDAC1();
        }
        public Bill1(int user_Id, DateTime date) {
            bill1 = new DBStubLayer.BillDAC1();
            this.User_Id1 = user_Id;
            this.Date1 = date;
        }
        public bool Insert_Bill(BLStub.Bill1 b) {
            if ( b==null ||   b.User_Id1<=0  ||b.Date1.DayOfYear==1 )
            {
                return false;
            }
            else
            {
                return bill1.Insert_Bill(b);
            }
        }

        //public bool Delete_Bill(int User_Id)
        //{
        //    if (User_Id <= 0)
        //        return false;
        //    else
        //        return bill.Delete_Bill(User_Id);
        //}


        //public bool Delete_Bill(DateTime DateOfBill)
        //{
        //    if (DateOfBill == null || DateOfBill.ToString().Equals(""))
        //        return false;
        //    else
        //        return bill.Delete_Bill(DateOfBill);
        //}
        public bool return_Bill_Id(Bill1 bill) {
            if (bill==null  || bill.User_Id1<=0)
            {
                return false;
            }
            else
            {
                return bill1.return_Bill_Id(bill);
            }
        }
    }
}
